<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0066)http://localhost/dayi/ecshopceshi/ecshop/user.php?act=address_list -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="ECSHOP v4.0.0">

<meta name="Keywords" content="">
<meta name="Description" content="">
<base href="__ROOT__/home/" />
<title>用户中心_ECSHOP演示站 - Powered by ECShop</title>

<link rel="shortcut icon" href="http://localhost/dayi/ecshopceshi/ecshop/favicon.ico">
<link rel="icon" href="http://localhost/dayi/ecshopceshi/ecshop/animated_favicon.gif" type="image/gif">
<link href="css/style.css" rel="stylesheet" type="text/css">

<!-- <script type="text/javascript" src="js/common.js"></script><script type="text/javascript" src="js/user.js"></script></head> -->

<body style="cursor: auto;">

<script type="text/javascript">
// var process_request = "正在处理您的请求...";
</script>

<div class="top-bar">
  <div class="fd_top fd_top1">
    <div class="bar-left">
          <div class="top_menu1"> 
          <font id="ECS_MEMBERZONE"><div id="append_parent"></div>
              欢迎光临本店<a href="{:url('login/login')}">
              <?php 
                 use think\Session;
                 $user_info = session::get("user_info");
                 if(!empty($user_info)){
                    echo $user_info['user_name'];
                 }else{
                    echo "登录";
                 }
                           
               ?><strong></strong></a>
              &nbsp;|&nbsp;&nbsp;
              <a href="{:url('login/reg')}">免费注册</a> 
          </font> </div>
    </div>
    <div class="bar-cart">
      <div class="fl cart-yh">
        <a href="{:url('user/welcome')}" class="">用户中心</a>
      </div>
             <div class="cart" id="ECS_CARTINFO"> <a href="{:url('shopcar/car')}" title="查看购物车">购物车</a> </div>
    </div>
  </div>
</div>

</div>
<div class="clear0 "></div>

<div class="block box">
 <div id="ur_here">
  <div class="path"><div>当前位置: <a href="{:url('index/index')}">首页</a> <code>&gt;</code> 用户中心</div></div> </div>
</div>

<div class="blank"></div>
<div class="block clearfix userpage">
  
  <div class="AreaL">
    <div class="box">
     <div class="box_1">
      <div class="userCenterBox">
        <div class="userMenu">
<a href="{:url('user/welcome')}"><img src="images/u1.gif"> 欢迎页</a>
<a href="{:url('user/userinfo')}"><img src="images/u2.gif"> 用户信息</a>
<a href="{:url('user/dingdan')}"><img src="images/u3.gif"> 我的订单</a>
<a href="{:url('user/shouhuo')}" class="curs"><img src="images/u4.gif"> 收货地址</a>
<a href="{:url('user/shoucang')}"><img src="images/u5.gif"> 我的收藏</a>
<a href="{:url('user/liuyan')}"><img src="images/u6.gif"> 我的留言</a>
<a href="{:url('user/biaoqian')}"><img src="images/u7.gif"> 我的标签</a>
<a href="{:url('usertwo/quehuo')}"><img src="images/u8.gif"> 缺货登记</a>
<a href="{:url('usertwo/hongbao')}"><img src="images/u9.gif"> 我的红包</a>
<a href="{:url('usertwo/tuijian')}"><img src="images/u10.gif"> 我的推荐</a>
<a href="{:url('usertwo/pinglun')}"><img src="images/u11.gif"> 我的评论</a>
<!--<a href="usertwo.php?act=group_buy">我的团购</a>-->
<a href="{:url('usertwo/genzong')}"><img src="images/u12.gif"> 跟踪包裹</a>
<a href="{:url('usertwo/money')}"><img src="images/u13.gif"> 资金管理</a>
<a href="{:url('login/back')}" style="background:none; text-align:right; margin-right:10px;"><img src="images/bnt_sign.gif"></a>
</div>      </div>
     </div>
    </div>
  </div>
  
  
  <div class="AreaR">
    <div class="box">
     <div class="box_1">
      <div class="userCenterBox boxCenterList clearfix" style="_height:1%;">
         
              
        
      
             
       

                                                   
      
              <h5><span>收货人信息</span></h5>
        <div class="blank"></div>
         
            <!--<script type="text/javascript" src="js/region.js"></script><script type="text/javascript" src="./用户中心_ECSHOP演示站 - Powered by ECShop_files/shopping_flow.js"></script>-->
                        <script type="text/javascript">
              // region.isAdmin = false;
                            var consignee_not_null = "收货人姓名不能为空！";
                            var country_not_null = "请您选择收货人所在国家！";
                            var province_not_null = "请您选择收货人所在省份！";
                            var city_not_null = "请您选择收货人所在城市！";
                            var district_not_null = "请您选择收货人所在区域！";
                            var invalid_email = "您输入的邮件地址不是一个合法的邮件地址。";
                            var address_not_null = "收货人的详细地址不能为空！";
                            var tele_not_null = "电话不能为空！";
                            var tele_or_mob_not_null = "电话或手机至少填写一项！";
                            var shipping_not_null = "请您选择配送方式！";
                            var payment_not_null = "请您选择支付方式！";
                            var goodsattr_style = "1";
                            var tele_invaild = "电话号码不有效的号码";
                            var zip_not_num = "邮政编码只能填写数字";
                            var mobile_invaild = "手机号码不是合法号码";
                            
              onload = function() {
                if (!document.all)
                {
                  document.forms['theForm'].reset();
                }
              }
              
            </script>
               <form action="{:url('User/addshouhuo')}" method="post" name="theForm" >
              <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
                <tbody><tr>
                  <td align="right" bgcolor="#ffffff">配送区域：</td>
                  <td colspan="3" align="left" bgcolor="#ffffff">



                  <select name="country[]"  class="address">
                      <option value="" selected="selected">请选择国家</option>
                      <option value="1">中国</option>
                  </select>



                  (必填) </td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">收货人姓名：</td>
                  <td align="left" bgcolor="#ffffff"><input name="consignee" type="text" class="inputBg" id="consignee_0" >
                  (必填) </td>
                  <td align="right" bgcolor="#ffffff">电子邮件地址：</td>
                  <td align="left" bgcolor="#ffffff"><input name="email" type="text" class="inputBg" id="email_0" value="ecshop@ecshop.com"></td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">详细地址：</td>
                  <td align="left" bgcolor="#ffffff"><input name="address" type="text" class="inputBg" id="address_0" >
                  (必填)</td>
                  <td align="right" bgcolor="#ffffff">邮政编码：</td>
                  <td align="left" bgcolor="#ffffff"><input name="zipcode" type="text" class="inputBg" id="zipcode_0" ></td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">电话：</td>
                  <td align="left" bgcolor="#ffffff"><input name="tel" type="text" class="inputBg" id="tel_0" >
                  </td>
                  <td align="right" bgcolor="#ffffff">手机：</td>
                  <td align="left" bgcolor="#ffffff"><input name="mobile" type="text" class="inputBg" id="mobile_0" ></td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">&nbsp;</td>
                  <td colspan="3" align="center" bgcolor="#ffffff">                    <input type="submit"  class="bnt_blue_1" value="新增收货地址">
                    <input type="reset" value="重置" / class="bnt_blue_1" >
                                        <!-- <input type="hidden" name="act" value="act_edit_address"> -->
                    <!-- <input name="address_id" type="hidden" value="1"> -->
                  </td>
                </tr>
              </tbody></table>
            </form>






  <?php if(isset($data)){

                  ?>
 <form action="{:url('User/shouhuoupdate')}" method="post" name="theForm" >
              <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
                <tbody><tr>
                  <td align="right" bgcolor="#ffffff">配送区域：</td>
                  <td colspan="3" align="left" bgcolor="#ffffff">

              

                  <span><?=$data['country']?><?=$data['province']?><?=$data['city']?><?=$data['district']?></span>

        
                   </td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">收货人姓名：</td>
                  <td align="left" bgcolor="#ffffff"><input name="consignee" type="text" class="inputBg" id="consignee_0" value="<?=$data['consignee']?>" >
                  (必填) </td>
                  <td align="right" bgcolor="#ffffff">电子邮件地址：</td>
                  <td align="left" bgcolor="#ffffff"><input name="email" type="text" class="inputBg" id="email_0" value="<?=$data['email']?>"></td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">详细地址：</td>
                  <td align="left" bgcolor="#ffffff"><input name="address" type="text" class="inputBg" id="address_0" value="<?=$data['address']?>" >
                  (必填)</td>
                  <td align="right" bgcolor="#ffffff">邮政编码：</td>
                  <td align="left" bgcolor="#ffffff"><input name="zipcode" type="text" class="inputBg" id="zipcode_0" value="<?=$data['zipcode']?>"></td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">电话：</td>
                  <td align="left" bgcolor="#ffffff"><input name="tel" type="text" class="inputBg" id="tel_0" value="<?=$data['tel']?>">
                  </td>
                  <td align="right" bgcolor="#ffffff">手机：</td>
                  <td align="left" bgcolor="#ffffff"><input name="mobile" type="text" class="inputBg" id="mobile_0" value="<?=$data['mobile']?>"></td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">&nbsp;</td>
                  <td colspan="3" align="center" bgcolor="#ffffff">                    <input type="submit"  class="bnt_blue_1" value="修改地址">
                    
                    <button class="bnt_blue"><a href="{:url('User/shouhuodelete')}?id=<?=$data['id']?>" style="color:#fff">删除</a></button>
                                        <!-- <input type="hidden" name="act" value="act_edit_address"> -->
                    <!-- <input name="address_id" type="hidden" value="1"> -->
                  </td>
                </tr>
              </tbody></table>
            </form>
            <?php } ?>



      </div>
     </div>
    </div>
  </div>
  
</div>
<div class="blank"></div>
<div class="foot-body">
  <!-- <div class="bads"><img src="./用户中心_ECSHOP演示站 - Powered by ECShop_files/bottom.jpg"></div> -->
  <div class="clear10"></div>
  
     <div class="foot-help">
                      <dl>
          <dt class="xs-1">新手上路 </dt>
                      <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=9" target="_blank" title="售后流程">售后流程</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=10" target="_blank" title="购物流程">购物流程</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=11" target="_blank" title="订购方式">订购方式</a></dd>
           
        </dl>
         
                        <dl>
          <dt class="xs-2">手机常识 </dt>
                      <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=12" target="_blank" title="如何分辨原装电池">如何分辨原装电池</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=13" target="_blank" title="如何分辨水货手机 ">如何分辨水货手机</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=14" target="_blank" title="如何享受全国联保">如何享受全国联保</a></dd>
           
        </dl>
         
                        <dl>
          <dt class="xs-3">配送与支付 </dt>
                      <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=15" target="_blank" title="货到付款区域">货到付款区域</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=16" target="_blank" title="配送支付智能查询 ">配送支付智能查询</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=17" target="_blank" title="支付方式说明">支付方式说明</a></dd>
           
        </dl>
         
                        <dl>
          <dt class="xs-4">会员中心</dt>
                      <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=18" target="_blank" title="资金管理">资金管理</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=19" target="_blank" title="我的收藏">我的收藏</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=20" target="_blank" title="我的订单">我的订单</a></dd>
           
        </dl>
         
                 
                 
         
        <div class="foot-weixin">
          <div class="weixin-txt">关注demo微信</div>
          <div class="weixin-pic">
            <<!-- img src="./用户中心_ECSHOP演示站 - Powered by ECShop_files/weixin.jpg"> -->
          </div>
        </div>
    </div>
     
    
   
  
  <div class="blank"></div>
  
<div class="footer_info"> © 2005-2018 ECSHOP 版权所有，并保留所有权利。       <br>
      <a href="http://xyunqi.com/products/ecshop?from=nav" target="_blank" style=" font-family:Verdana; font-size:11px;">Powered&nbsp;by&nbsp;<strong><span style="color: #3366FF">ECShop</span>&nbsp;<span style="color: #FF9966">v4.0.0</span></strong></a>&nbsp;<a href="http://www.ecshop.com/license.php?product=ecshop_b2c&amp;url=http%3A%2F%2Flocalhost%2Fdayi%2Fecshopceshi%2Fecshop%2F" target="_blank">&nbsp;&nbsp;Licensed</a><br>
            <div>ICP备案证书号:<a href="http://www.miibeian.gov.cn/" target="_blank"></a></div>
    </div>
  <div class="clear10"></div>
</div>



</body></html>

<script src="__ROOT__/home/js/jquery-2.1.4.min.js"></script>
<script>
  $(document).on("change",".address",function(){

      var obj = $(this);

      var parent_id = obj.val();
      $(this).nextAll().remove();
      if(parent_id==''){
        alert('请选择');return false;
      }
      var html="";
      $.ajax({

          url:"{:url('User/address')}",
          type:"post",
          data:{parent_id:parent_id},
          dataType:"json",
          success:function(res){
              if(res==''){
                  return false;
              }
               html+="<select name='country[]'  class='address'><option value='' >请选择……</option>";
                
                  $.each(res,function(k,v){

                    html+="<option value='"+v.region_id+"'>"+v.region_name+"</option>";

                  })

               html+="</select>";

               obj.after(html);
               

               
          }
      })

  })
  </script>
